﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MP3Ganizer.Common.Interfaces.MassEditor;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Composite.Regions;
using MP3Ganizer.Common.BaseObject;

namespace MP3Ganizer.Modules.MassEditor.ViewModels
{
    public class MassEditorViewModel : BaseModuleViewModel, IMassEditorViewModel
    {
        private IUnityContainer _unityContainer;

        private IArtistsEditorViewModel _artistsEditorViewModel;

        public IArtistsEditorViewModel ArtistsEditorViewModel
        {
            get { return _artistsEditorViewModel; }
            set { _artistsEditorViewModel = value; }
        }

        private IAlbumsEditorViewModel _albumsEditorViewModel;

        public IAlbumsEditorViewModel AlbumsEditorViewModel
        {
            get { return _albumsEditorViewModel; }
            set { _albumsEditorViewModel = value; }
        }
        
        public MassEditorViewModel(IUnityContainer unityContainer)
        {
            _unityContainer = unityContainer;
            _artistsEditorViewModel = _unityContainer.Resolve<IArtistsEditorViewModel>();
            _artistsEditorViewModel.Initialize();
            _albumsEditorViewModel = _unityContainer.Resolve<IAlbumsEditorViewModel>();
            _albumsEditorViewModel.Initialize();
        }
    }
}
